@extends('layout.home')
@section('title','问题detail')
@section('content')

  <div class="aw-container-wrap"> 
   <div class="container"> 
    <div class="row"> 
     <div class="aw-content-wrap clearfix"> 
      <div class="col-sm-12 col-md-9 aw-main-content"> 
       <div class="aw-mod aw-question-detail aw-item"> 
        <div class="mod-head"> 
         <div class="biaoboxs pull-right hidden-xs"> 
         </div> 
         <h1>{{$card->title}}</h1> 
         <div class="operate clearfix"> 
          <a href="javascript:;" onclick="" class="follow btn btn-normal btn-success pull-left  active"><span>取消关注</span> <em>|</em> <b>1</b></a> 
         </div> 
        </div> 
        <div class="mod-body"> 
         <div class="content markitup-box">
           {{$card->content}} 
         </div> 
        </div> 
        <div class="mod-footer"> 
         <div class="meta"> 
          <span class="text-color-999">{{$card->time}}</span> 
          <a class="text-color-999 active" data-toggle="tab" href="#answer"><i class="icon icon-comment"></i>{{count($replys)}} 条回复</a>   
         </div> 
        </div>   
       </div> 
       <div class="aw-mod aw-question-comment"> 
        <div class="mod-head"> 
         <ul class="nav nav-tabs aw-nav-tabs active"> 
          <li><a href="/question/guanzhu?id={{$card->id}}">关注的人</a></li> 
          <li><a href="/question/time?id={{$card->id}}">时间 <i class="icon icon-up"></i></a></li> 
          <li><a href="/question/zan?id={{$card->id}}">票数  (未完成)</a></li> 
          <h2 class="hidden-xs">{{count($replys)}} 个回复</h2> 
         </ul> 
        </div>
        <div class="mod-body aw-feed-list"> 
         @foreach($replys as $k=>$v)
 							<div class="aw-item" uninterested_count="0" force_fold="0" id="answer_list_3">
								<div class="mod-head">
									<a class="anchor" name="answer_3"></a>
										<!-- 用户头像 -->
										<a class="aw-user-img aw-border-radius-5" href="/user/center?id={{$v->u_id}}" data-id="1"><img src="{{$v->profile}}" alt="{{$v->username}}" /></a>					<!-- end 用户头像 -->
										<div class="title">
											<p><a class="aw-user-name" href="/user/center?id={{$v->u_id}}" data-id="1">{{$v->username}}</a>
											</p>
											<p class="text-color-999 aw-agree-by hide">
												赞同来自:</p>
										</div>
									</div>
									<div class="mod-body clearfix">
										<!-- 评论内容 -->
										<div class="markitup-box">{{$v->contents}}</div>
										<div class="markitup-box">
                    @if(($v->pid) != 0)
                    <div>回复&nbsp;{{$v->pname}}：</div>
                    @endif
                    {{$v->contents}}
                    <?php 
                      if($v->rprofile){

                        echo '<div class="aw-upload-img-list active"><div><img src="'.$v->rprofile.'" class="img-polaroid" title=""></div></div><br>';
                      }
                     ?>                      
                    </div>
										<!-- end 评论内容 -->
									</div>
									<div class="mod-footer">
										<!-- 社交操作 -->
										<div class="meta clearfix">
											<span class="text-color-999 pull-right">{{$v->rtime}}</span>
											<!-- 投票栏 -->
											<span class="operate">
                        <a class="agree disabled "><i class="icon icon-agree"></i> <b class="count">0</b></a>
												<a class="agree disabled "><i class="icon icon-favor"></i>收藏 <b class="count"></b></a>
											</span>
                      <a class="text-color-999 active" data-toggle="tab"><i class="icon icon-comment"></i>回复</a>
											<!-- end 投票栏 -->
										</div>
										<!-- end 社交操作 -->
									</div>
								</div>
							@endforeach
        </div> 
       </div> 
       <!-- end 问题详细模块 --> 
       <!-- 回复编辑器 --> 
       <div class="aw-mod aw-replay-box question"> 
        <a name="answer_form"></a> 
        @if(empty(session('id')))
        <p align="center">要回复问题请先<a href="/login/">登录</a>或<a href="/register/">注册</a></p>
        @else
      <form class="mws-form" action="/reply/insert" method="post" class="tab-pane" enctype="multipart/form-data" name="answer">
        <input name="u_id" value="{{session('id')}}" type="hidden">
        <input name="tid" value="{{$card->id}}" type="hidden">
        <input name="pid" value="0" type="hidden">
        <input name="rtime" value="{{date('Y-m-d H:i:s',time())}}" type="hidden">
        <div class="mod-head"> 
          <a href="/user/center?id={{session('id')}}" class="aw-user-name"><img alt="{{session('username')}}" src="{{session('profile')}}" /></a> 
          <p> <label class="pull-right"> </label> {{session('username')}} </p> 
        </div>
        <div class="mws-form-inline">
          <textarea class="wmd-input form-control autosize" rows="15" name="contents" value=""></textarea>
          <div class="mws-form-row">
            <label class="mws-form-label">配图</label>
            <div class="mws-form-item">
                <input class="small" type="file" name="rprofile" value="">
            </div>
          </div>
        </div>
        <div class="mws-button-row">
        {{csrf_field()}}
          <input value="添加" class="btn btn-danger" type="submit">
          <input value="重置" class="btn " type="reset">
        </div>
      </form>
@endif

       </div> 
       <!-- end 回复编辑器 --> 
      </div> 
      <!-- 侧边栏 --> 
      <div class="col-md-3 aw-side-bar hidden-xs hidden-sm"> 
       <!-- 发起人 --> 
       <div class="aw-mod"> 
        <div class="mod-head"> 
         <h3>发起人</h3> 
        </div> 
        <div class="mod-body"> 
         <dl> 
          <dt class="pull-left aw-border-radius-5"> 
           <a href="/user/center?id={{$card->uid}}"><img alt="" src="{{$card->uprofile}}" /></a> 
          </dt> 
          <dd class="pull-left"> 
           <a class="aw-user-name" href="/user/center?id={{$card->uid}}" data-id="1"><p>{{$card->username}}</p></a> 
           
          </dd> 
         </dl> 
         <ul style="font-size:12px;"> 
          <li><i class="icon icon-prestige"></i> 威望 : <em class="aw-text-color-orange">3</em></li> 
          <li><i class="icon icon-score"></i> 积分 : <em class="aw-text-color-orange">2065</em></li> 
          <li><i class="icon icon-user" style="font-size:14px;"></i> 粉丝 : <em class="aw-text-color-orange">2</em></li> 
         </ul> 
        </div> 
       </div> 
       <!-- end 发起人 --> 


       <!-- 相关问题 --> 
       <div class="aw-mod"> 
        <div class="mod-head"> 
         <h3>相关问题(不行就删掉)</h3> 
        </div> 
        <div class="mod-body font-size-12"> 
         <ul> 
          <li><a href="/">默认分类下的问题</a></li> 
          <li><a href="/">第二个问题</a></li> 
          <li><a href="/">第一个问题</a></li> 
         </ul> 
        </div> 
       </div> 
       <!-- end 相关问题 --> 
      </div> 
      <!-- end 侧边栏 --> 
     </div> 
    </div> 
   </div> 
  </div> 
  <script type="text/javascript">
	var ATTACH_ACCESS_KEY = 'bab9fb8fc92c4029a8f2ad4d7a92dd7d';
	var ITEM_IDS = '';
	var COMMENT_UNFOLD = '';
	var QUESTION_ID = 3;
	var UNINTERESTED_COUNT = 5;
	var ANSWER_EDIT_TIME = 30;
	var USER_ANSWERED = '';
	var UPLOAD_ENABLE = 'Y';
	var ANSWER_TYPE = 'answer';
</script> 
  <script type="text/javascript" src=""></script> 

@endsection